Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serde_json::error::Error::msg() method #719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmorer
Copy link

@gmorer gmorer commented Oct 13, 2020

Actually it is not possible to have the error message without the line and column number.

I had to parse a file with one object by line, the error line was always 1 but not necessary in the file.

You cant get the line and column with serde_json::error::Error::{line,column} but the error message from the ErrorCode is private.

You can now get only missing field `type` instead of the whole missing field `type` at line 1 column 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant